import * as React from "react";
import { LucideIcon, Trash2, Plus, Edit } from "lucide-react";
import { cn } from "@/lib/utils";

interface ResumeIconProps {
  icon: string;
  className?: string;
  size?: number;
}

const iconMap: Record<string, LucideIcon> = {
  "ie-stick": Trash2,
  plus: Plus,
  edit: Edit,
};

const ResumeIcon = React.forwardRef<HTMLDivElement, ResumeIconProps>(
  ({ icon, className, size = 16, ...props }, ref) => {
    const IconComponent = iconMap[icon] || Trash2;

    return (
      <div
        ref={ref}
        className={cn("flex items-center justify-center", className)}
        {...props}
      >
        <IconComponent size={size} />
      </div>
    );
  }
);

ResumeIcon.displayName = "ResumeIcon";

export { ResumeIcon };
